{
  let temp: number | string | boolean = 100;
  temp = "hello ts";
  temp = false;

  let timer: number | null = null;
  timer = setInterval(() => {}, 1000);

  // 定义一个数组，数组中可以有数字或者字符串, 需要注意 | 的优先级
  let arr: (number | string)[] = [1, "abc", 2];
}
